home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 25
/
Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso
/
Aminet
/
dev
/
amos
/
AMOS0398.lzh
/
AMOSLIST
/
000179_amos-request@svcs1.digex.net_Fri Mar 20 01:36:20 1998.msg
< prev
next >
Wrap
Text File
|
1998-04-01
|
2KB
|
58 lines
>From amos-request@svcs1.digex.net Fri Mar 20 01:36:20 1998
Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
by pony-2.mail.digex.net (8.8.8/8.8.8) with ESMTP id BAA10302
for <mcox@access.digex.net>; Fri, 20 Mar 1998 01:36:20 GMT
Received: (from daemon@localhost)
by svcs1.digex.net (8.8.5/8.8.5) id NAA02767
for amos-out; Thu, 19 Mar 1998 13:26:05 -0500 (EST)
Received: from pony-2.mail.digex.net (pony-2.mail.digex.net [204.91.241.6])
by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id NAA02764
for <amos-list@svcs1.digex.net>; Thu, 19 Mar 1998 13:26:05 -0500 (EST)
Received: from star.flashnet.it (star.flashnet.it [194.247.160.2])
by pony-2.mail.digex.net (8.8.8/8.8.8) with ESMTP id NAA26995
for <amos-list@access.digex.net>; Thu, 19 Mar 1998 13:25:57 -0500 (EST)
Received: from ip054.pool-04.flashnet.it (Berionne@ip054.pool-04.flashnet.it [194.247.161.54])
by star.flashnet.it (8.8.7/8.8.6) with SMTP id TAA05432
for <amos-list@access.digex.net>; Thu, 19 Mar 1998 19:25:54 +0100
Date: 18 Mar 98 23:08:45 +0100
From: "Michele Berionne" <berionne@flashnet.it>
Subject: Re: Sorting problems
To: "Nathan Reynolds" <amos-list@access.digex.net>
In-Reply-To: <004901bd526a$b4149260$6c4d08c3@nsl>
Message-ID: <816.381T2299T13885424@flashnet.it>
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8bit
X-Mailer: THOR 2.5a (Amiga;TCP/IP)
Status: O
X-Status:
Hello!
> Yeah, sorry about that. I'm not great with sorting algorithms. I've been
> told that a flag would be a good idea, but I'm not sure how to implement
> it. How about an updated algorithm?
A sorting algorithm with a flag is done in this way.
Repeat
FLAG=False
For T=1 to N
If A(T)>A(T+1)
Swap A(T),A(T+1)
FLAG=True
End If
Next
Until Not FLAG
...well, actually I have no time now to see if I did stupid mistakes.
Moreover you can implement the check (>) and the swap routine as you need
them.
Bye
berionne@flashnet.it >>Flagger<<
+---------------------------------------------------------------+
|���BASIC programmers never die, they GOSUB and don't RETURN. |
+---------------------------------------------------------------+